package com.lixueju.security.box.web.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lixueju.security.box.core.model.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lixueju.security.box.core.model.dto.UserToken;
import com.lixueju.security.box.core.model.request.*;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 用户基础表，存储用户基本信息 服务类
 * </p>
 *
 * @author lixueju
 * @since 2019-11-13
 */
public interface IUserService extends IService<User> {

    IPage<User> selectUserPage(Page<User> page, User user);

    Boolean updateUserRole(UpdateUserRequest updateUserRequest);

    Boolean addUser(User user);

    Boolean updateUser(User user);

    Boolean checkMobile(String mobile, String oldMobile, Integer userType);

    UserToken bindWeixinMobile(WeixinDecodeLoginRequest weixinDecodeLoginRequest, Long userId, HttpServletRequest request);

    UserToken bindWeixin(WeixinLoginRequest weixinLoginRequest, Long userId,HttpServletRequest request);

    UserToken bindMobile(BindMobileRequest bindMobileRequest, Long userId, HttpServletRequest request);

    Boolean upPassword(upPasswordRequest upPasswordRequest, Long userId);

    Boolean upPasswordByMobile(upPasswordRequest upPasswordRequest);
}
